// https://nuxt.com/docs/api/configuration/nuxt-config
import { resolve } from 'pathe'

export default defineNuxtConfig({
  css: [
    '@/assets/css/tailwind.scss',
    '@/assets/css/common.scss',
    '@/assets/css/transition.scss',
  ],
  pages: true,
  router: {
    options: {
      strict: true, // 严格的（指/）
    },
  },
  modules: [
    '@vant/nuxt',
    '@vueuse/nuxt',
    '@hypernym/nuxt-gsap',
    'nuxt-icon',
    'nuxt-lodash',
  ],
  vant: {
    lazyload: {
      lazyComponent: true,
    },
  },
  postcss: {
    plugins: {
      tailwindcss: {},
      autoprefixer: {},
    },
  },
  build: {},
  ssr: true,
  alias: {
    imgs: resolve(__dirname, './assets/images'),
  },
  app: {
    head: {
      title: 'Pakchoi.queue',
      htmlAttrs: {
        lang: 'zh-CN',
      },
      charset: 'utf-8',
      meta: [],
      link: [],
      script: [],
      noscript: [{ children: 'JavaScript is required' }],
    },

    pageTransition: {
      name: 'page-trans',
      mode: 'out-in',
    },
  },
  generate: {},

  vite: {
    base: './',
  },

  devServer: {
    port: 3066,
  },
})
